pub mod application_controller;
pub mod article_controller;
pub mod assets_controller;
pub mod authorize_controller;
pub mod blacklist_controller;
pub mod club_controller;
pub mod email_controller;
pub mod form_controller;
pub mod github_controller;
pub mod invite_controller;
pub mod message_controller;
pub mod profile_controller;
pub mod registry_controller;
pub mod user_controller;
pub mod wechat_controller;
use self::{
    application_controller::configure_application_controller,
    article_controller::configure_article_controller,
    assets_controller::configure_assets_controller,
    authorize_controller::configure_authorize_controller,
    blacklist_controller::configure_blacklist_controller,
    club_controller::configure_club_controller, email_controller::configure_email_controller,
    form_controller::configure_form_controller, github_controller::configure_github_controller,
    invite_controller::configure_invite_controller,
    message_controller::configure_message_controller,
    profile_controller::configure_profile_controller,
    registry_controller::configure_registry_controller, user_controller::configure_user_controller,
    wechat_controller::configure_wechat_controller,
};
use actix_web::web;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub struct OkResponse {
    pub status: bool,
}

pub static OK_RESPONSE: OkResponse = OkResponse { status: true };

pub fn configure_v2_controller(config: &mut web::ServiceConfig) {
    config
        .service(web::scope("/user").configure(configure_user_controller))
        .service(web::scope("/club").configure(configure_club_controller))
        .service(web::scope("/assets").configure(configure_assets_controller))
        .service(web::scope("/form").configure(configure_form_controller))
        .service(web::scope("/application").configure(configure_application_controller))
        .service(web::scope("/invite").configure(configure_invite_controller))
        .service(web::scope("/message").configure(configure_message_controller))
        .service(web::scope("/registry").configure(configure_registry_controller))
        .service(web::scope("/authorize").configure(configure_authorize_controller))
        .service(web::scope("/wechat").configure(configure_wechat_controller))
        .service(web::scope("/github").configure(configure_github_controller))
        .service(web::scope("/article_section").configure(configure_article_controller))
        .service(web::scope("/blacklist").configure(configure_blacklist_controller))
        .service(web::scope("/email").configure(configure_email_controller))
        .service(web::scope("/profile").configure(configure_profile_controller));
}
